/****************************************************************************
'binarytree.h' - Header file that declares the type definition for BinaryTreeNode
	        and BinaryTree. Also declares various functions that manipulate BinaryTreeNode
	        or BinaryTrees (implemented elsewhere; see binarytree.c)
	      - Programmer: Vincent Paul F. Fiestada
*****************************************************************************/

#pragma once
#include "cardinal.h" // This file includes libraries used by the entire project

typedef struct BinaryTreeNode
{
	char Data;
	struct BinaryTreeNode * LeftBranch;
	struct BinaryTreeNode * RightBranch;
	int Tag; //For link inversion

} BinaryTreeNode;

typedef struct
{
	BinaryTreeNode * Root;
} BinaryTree;

// Function declarations; see 'binarytree.c' for definitions
BinaryTree * CreateBinaryTree();
void PrintBinaryTree(BinaryTreeNode * root, int spaces);
void AnnihilateBinaryTree(BinaryTree * tree);
void UprootBinaryTree(BinaryTreeNode * root);
BinaryTree * PreInordertoBinTree(BinaryTree * tree, char * preorder, char * inorder);
char * LinkInversionTraversal(BinaryTree * tree, char * dest, int mode);
char * LevelOrderTraversal(BinaryTreeNode * root, char * dest);

/******************************************************************************
Include Function Definitions: (Won't get compiled otherwise since I don't know
how to control the linker)
******************************************************************************/
#include "binarytree.c"
